/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.longph.btvn1;

import java.util.Scanner;

/**
 *
 * @author Long Pham
 */
public class Bai3 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        System.out.println("Mời bạn nhập n");
        n = sc.nextInt();
        int i = 2;
        int k = (int) Math.sqrt(n);
        while (n > 0) {
            if (i > k) {
                break;
            }
            while (n % i == 0 && n/i != 1) {
                n = n / i;
                System.out.print(i + "x");
            }
            if(n/i == 0)break;
            i++;
        }   
            System.out.println(n);
    }
}
